package com.app.mvvmkotlindemo.network

import com.app.mvvmkotlindemo.bean.*
import com.everyline.baselibrary.network.BaseResult

import okhttp3.RequestBody
import retrofit2.http.*

/**
 * Created by on 2020/11/23.
 * 天天挂线
 *  746608431@qq.com
 *  描述:TODO
 */

interface ApiService {

    //获取版本详情
    @FormUrlEncoded
    @POST("common/getAppVersion")
    suspend fun getAppVersion(@FieldMap map: Map<String, String>): BaseResult<AppVersionBean>

    //获取短信验证码
    @FormUrlEncoded
    @POST("common/sendSmsCode")
    suspend fun sendSmsCode(@FieldMap map: Map<String, String>): BaseResult<String>

    //司机验证码登录
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/driverLoginByMobile")
    suspend fun driverLoginByMobile(@FieldMap map: Map<String, String>): BaseResult<UserBean>

    //司机token登录
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/driverLoginByToken")
    suspend fun driverLoginByToken(@FieldMap map: Map<String, String>): BaseResult<UserBean>

    //获取司机首页数据
    @POST("taxi/app/zc/driver/base/driverIndex")
    suspend fun driverIndex(): BaseResult<DriverIndexBean>

    //修改司机出车状态
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/modifyIsDriving")
    suspend fun modifyIsDriving(@FieldMap map: Map<String, String>): BaseResult<Any>


    //获取司机个人中心数据
    @POST("taxi/app/zc/driver/base/driverPersonalCenter")
    suspend fun driverPersonalCenter(): BaseResult<DriverPersonalCenterBean>

    //获取司机收益详情
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/detailDriverProfit")
    suspend fun detailDriverProfit(@FieldMap map: Map<String, String>): BaseResult<DetailDriverProfitBean>

    //司机提现
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/driverWithdrawal")
    suspend fun driverWithdrawal(@FieldMap map: Map<String, String>): BaseResult<Any>

    //司机抢单
    @FormUrlEncoded
    @POST("taxi/app/zc/order/special/orderGrabbing")
    suspend fun orderGrabbing(@FieldMap map: Map<String, String>): BaseResult<OrderGrabbingBean>

    //司机修改订单状态
    @FormUrlEncoded
    @POST("taxi/app/zc/order/special/modifyOrderStatusByDriver")
    suspend fun modifyOrderStatusByDriver(@FieldMap map: Map<String, String>): BaseResult<OrderMakerTimeBean>

    //司机订单详情
    @FormUrlEncoded
    @POST("taxi/app/zc/order/special/getOrderSpecial")
    suspend fun getOrderSpecial(@FieldMap map: Map<String, String>): BaseResult<OrderSpecialBean>

    //获取司机预约单
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/listBookingOrder")
    suspend fun listBookingOrder(@FieldMap map: Map<String, String>): BaseResult<BookingOrderListBean>

    //获取司机预约单
    @FormUrlEncoded
    @POST("taxi/app/zc/order/special/cancelOrder")
    suspend fun cancelOrder(@FieldMap map: Map<String, String>): BaseResult<OrderCancleBean>

    //查询所有的开通专车的区域
    @POST("taxi/app/zc/driver/base/getZcOpenArea")
    suspend fun getZcOpenArea(): BaseResult<MutableList<ZcOpenAreaBean>?>

    //根据开通城市查询运营商
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/findAllZcDepartmentByOpenArea")
    suspend fun findAllZcDepartmentByOpenArea(@FieldMap map: Map<String, String>): BaseResult<MutableList<OpenAreaBean>?>

    //上传图片
    @Multipart
    @POST("common/uploadFile")
    suspend fun uploadFile(@PartMap params: Map<String, @JvmSuppressWildcards RequestBody>): BaseResult<ImgBean>   //上传图片

    //查询车辆颜色
    @POST("taxi/app/zc/driver/base/findAllCarColor")
    suspend fun findAllCarColor(@Header("validStr") validStr: String): BaseResult<MutableList<CarColorBean>?>

    //获取所有的银行信息
    @POST("taxi/app/zc/driver/base/findAllBank")
    suspend fun findAllBank(@Header("validStr") validStr: String): BaseResult<MutableList<BankListBean>?>

    //司机注册
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/driverRegister")
    suspend fun driverRegister(
        @Header("validStr") validStr: String,
        @FieldMap map: Map<String, String>
    ): BaseResult<JwtTokenBean>


    //司机订单详情
    @FormUrlEncoded
    @POST("common/getImgVerify")
    suspend fun getImgVerify(@FieldMap map: Map<String, String>): BaseResult<ImgVerifyBean>

    //司机注册
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/findAllCarBrandInfo")
    suspend fun findAllCarBrandInfo(
        @Header("validStr") validStr: String,
        @FieldMap map: Map<String, String>
    ): BaseResult<MutableList<CarBrandInfoBean>>


    //查询银行所在区域
    @POST("taxi/app/zc/driver/base/findAllArea")
    suspend fun findAllArea(@Header("validStr") validStr: String): BaseResult<MutableList<AreaAllBean>>

    //提交资质信息
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/addAudit")
    suspend fun addAudit(@FieldMap map: Map<String, String>): BaseResult<UploadAuditBean>

    //提交更新资质信息
    @FormUrlEncoded
    @POST("taxi/app/zc/driver/base/addTempAudit")
    suspend fun addTempAudit(@FieldMap map: Map<String, String>): BaseResult<UploadAuditBean>

    //提交之后的操作记录界面数据
    @POST("taxi/app/zc/driver/base/actionRecordByUser")
    suspend fun actionRecordByUser(): BaseResult<RecordByUserBean>


    //资质信息回显
    @POST("taxi/app/zc/driver/base/getZcDriverBaseInfo")
    suspend fun getZcDriverBaseInfo(): BaseResult<AddAuditBean>

    //放弃修改
    @POST("taxi/app/zc/driver/base/giveUpChanges")
    suspend fun giveUpChanges(): BaseResult<UpChangesBean>

    //首页过期资质提醒的列表
    @POST("taxi/app/zc/driver/base/qualificationExpiresList")
    suspend fun qualificationExpiresList(): BaseResult<MutableList<ExpiresListBean>>

}